package com.jiahua.user.biz.rest.service;

import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;

import com.jiahua.user.biz.rest.model.User;

@Path("v1")
public interface UserService {

	@POST
	@Path("users")
	// @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
	// @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
	@Consumes({ "application/json", "application/xml" })
	@Produces({ "application/json", "application/xml" })
	public User create(User user);

	@GET
	@Path("users/get")
	@Consumes({ "application/json", "application/xml" })
	@Produces({ "application/json"})
	public User read();

	@PUT
	@Path("users/{uuid}")
	@Consumes({ "application/json", "application/xml" })
	@Produces({ "application/json", "application/xml" })
	public void update(@PathParam("uuid") String uuid, User user);

	@DELETE
	@Path("users/{uuid}")
	@Consumes({ "application/json", "application/xml" })
	@Produces({ "application/json", "application/xml" })
	public void delete(@PathParam("uuid") String uuid);
}
